
class TextureEncoder
{
    public static void ReadBmp(System.IO.Stream stream)
    {
        FreeImageAPI.FREE_IMAGE_FORMAT format = FreeImageAPI.FREE_IMAGE_FORMAT.FIF_UNKNOWN;
        var bitmap = FreeImageAPI.FreeImage.LoadFromStream(stream,
            FreeImageAPI.FREE_IMAGE_LOAD_FLAGS.DEFAULT,ref format);
        //FreeImageAPI.FreeImage.ConvertToRawBits(bits,bitmap,1024,8,1,1,1,true);
    }
}